package com.sumainfor.zuul.controller;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.zuul.service.getdept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@RequestMapping("/key/getdeptController")
@Controller
public class getdeptController {

    @Autowired
    private getdept biz;


    @ResponseBody
    @RequestMapping("getdeptByType")
    public JsonResult getdeptByType(@RequestParam Map<String,Object> params){


        System.err.println(params.get("userid").toString());

        return biz.getdeptByType(params);
    }


    @ResponseBody
    @RequestMapping("getnamebyid")
    public String  getnamebyid(@RequestParam String id) {
        return biz.getnamebyid(id);
    }
}
